//
//  WeixinSessionActivity.m
//  WeixinActivity
//
//  Created by Johnny iDay on 13-12-2.
//  Copyright (c) 2013年 Johnny iDay. All rights reserved.
//

#import "WeixinSessionActivity.h"
#import "WeiXinTimeLineViewController.h"
#import "AppDelegate.h"
@implementation WeixinSessionActivity
/**
 *  这个是显示在share action上的图标
 *
 *  @return 图标
 */
- (UIImage *)activityImage
{
    return [UIImage imageNamed:@"icon_session.png"];
}
/**
 *  这个是显示在share action上的图标下面的文子
 *
 *  @return 文子
 */
- (NSString *)activityTitle
{
    return @"微信";
}
//- (nullable UIViewController *)activityViewController
//{
//    WeiXinTimeLineViewController *timeLine = [WeiXinTimeLineViewController new];
//    //在这里设置背景图片为当前屏幕的截图
//    timeLine.backImage = [self screenImageWithSize:[UIScreen mainScreen].bounds.size];
//    //把要发送的东西传过去
//    return timeLine;
//}
//-(UIImage *)screenImageWithSize:(CGSize )imgSize{
//    UIGraphicsBeginImageContext(imgSize);
//    CGContextRef context = UIGraphicsGetCurrentContext();
//    AppDelegate * app = (AppDelegate *)[UIApplication sharedApplication].delegate; //获取app的appdelegate，便于取到当前的window用来截屏
//    [app.window.layer renderInContext:context];
//    UIImage * img = UIGraphicsGetImageFromCurrentImageContext();
//    UIGraphicsEndImageContext();
//    return img;
//}

@end
